export default [
    {
        name: '文本展示控件',
        nameEn: 'Label',
        code: 'label',
        des: '展示文本内容，支持使用换行符换行展示',
        valueType: 'String',
        exampleProps: {
            type: 'label',
        },
        exampleValue: '一去二三里，\n烟村四五家。',
    },
    {
        name: '单行文本输入框',
        nameEn: 'Text',
        code: 'text',
        des: '',
        valueType: 'String',
        exampleProps: {
            type: 'text',
            maxlength: 20,
        },
        exampleValue: '于是饮酒乐甚，以头抢地尔！',
    },
    {
        name: '文本输入连接框',
        nameEn: 'InputRange',
        code: 'inputrange',
        des: '',
        valueType: 'String[]',
        exampleProps: {
            type: 'inputrange',
            maxlength: 20,
        },
        exampleValue: ['亭台六七座', '八九十枝花'],
    },
    {
        name: '密码输入框',
        nameEn: 'Password',
        code: 'password',
        des: '',
        valueType: 'String',
        exampleProps: {
            type: 'password',
            maxlength: 10,
        },
        exampleValue: '7758258',
    },
    {
        name: '多行文本输入框',
        nameEn: 'Textarea',
        code: 'textarea',
        des: '',
        valueType: 'String',
        exampleProps: {
            type: 'textarea',
            rows: 2,
        },
        exampleValue: '李白\n将进酒',
    },
    {
        name: '数字输入框',
        nameEn: 'Number',
        code: 'number',
        des: '支持配置展示计算器面板用于快捷计算',
        valueType: 'Number | null',
        exampleProps: {
            type: 'number',
            showCalculator: true,
        },
        exampleValue: '666',
    },
    {
        name: '数值区间输入框',
        nameEn: 'NumberRange',
        code: 'numberrange',
        des: '支持配置展示计算器面板用于快捷计算',
        valueType: 'Number[]',
        exampleProps: {
            type: 'numberrange',
        },
        exampleValue: [5, 10],
    },
    {
        name: '下拉选择框',
        nameEn: 'Select',
        code: 'select',
        des: '支持配置接口自动发起请求、支持多选',
        valueType: 'String | Number | String[] | Number[]（取决于是否多选）',
        exampleProps: {
            type: 'select',
            options: [
                {
                    label: '金樽清酒斗十千',
                    value: '1',
                },
                {
                    label: '玉盘珍羞直万钱',
                    value: '2',
                },
            ],
        },
        exampleValue: '1',
    },
    {
        name: '下拉选择器',
        nameEn: 'DropSelect',
        code: 'dropselect',
        des: '支持配置接口自动发起请求',
        valueType: 'String | Number',
        exampleProps: {
            type: 'dropselect',
            options: [
                {
                    label: '停杯投箸去拉屎',
                    value: '1',
                },
                {
                    label: '拔剑四顾一口痰',
                    value: '2',
                },
            ],
        },
        exampleValue: '1',
    },
    {
        name: '级联选择器',
        nameEn: 'Cascader',
        code: 'cascader',
        des: '支持配置接口自动发起请求',
        valueType: 'String | Number | String[] | Number[]（取决于是否多选）',
        exampleProps: {
            type: 'cascader',
            options: [
                {
                    label: 'IT研发',
                    value: 'ityanfa',
                    children: [
                        {
                            label: '前端组',
                            value: 'qianduan',
                            children: [
                                {
                                    label: '飞天老李',
                                    value: 'feitianlaoli',
                                },
                                {
                                    label: '法外狂徒张三',
                                    value: 'zhangsan',
                                },
                                {
                                    label: '瑟瑟发抖的望仔',
                                    value: 'xw',
                                },
                            ],
                        },
                        {
                            label: '后端组',
                            value: 'houduan',
                            children: [
                                {
                                    label: '带薪拉屎老六',
                                    value: 'laoliu',
                                },
                                {
                                    label: '二蛋快跑别管我',
                                    value: 'dasima',
                                },
                            ],
                        },
                    ],
                },
            ],
        },
        exampleValue: ['ityanfa', 'qianduan', 'zhangsan'],
    },
    {
        name: '单选框',
        nameEn: 'Radio',
        code: 'radio',
        des: '支持配置接口自动发起请求',
        valueType: 'String | Number',
        exampleProps: {
            type: 'radio',
            options: [
                {
                    label: '停杯投箸去拉屎',
                    value: '1',
                },
                {
                    label: '拔剑四顾一口痰',
                    value: '2',
                },
            ],
        },
        exampleValue: '1',
    },
    {
        name: '复选框',
        nameEn: 'Check',
        code: 'check',
        des: '支持配置接口自动发起请求',
        valueType: 'String[] | Number[]',
        exampleProps: {
            type: 'check',
            options: [
                {
                    label: '欲渡黄河冰塞川',
                    value: '1',
                },
                {
                    label: '将登太行雪满山',
                    value: '2',
                },
            ],
        },
        exampleValue: ['2'],
    },
    {
        name: '日期、日期时间、日期区间选择框',
        nameEn: 'Date',
        code: 'date',
        des: '支持 9 种类型的时间控件选择，覆盖所有的场景',
        valueType: 'String | Number | Date | String[] | Number[] | Date[]（取决于格式化规则及是否多选，是否区间选择）',
        exampleProps: {
            type: 'date',
        },
        exampleValue: '2023-09-01',
    },
    {
        name: '时间选择框',
        nameEn: 'Time',
        code: 'time',
        des: '支持时分秒区间选择、时分选择、时分区间选择',
        valueType: 'String | Number | Date | String[] | Number[] | Date[]（取决于格式化规则及是否多选，是否区间选择）',
        exampleProps: {
            type: 'time',
        },
        exampleValue: '00:38:56',
    },
    {
        name: '固定时间选择框',
        nameEn: 'DropTime',
        code: 'droptime',
        des: '',
        valueType: 'String | String[]',
        exampleProps: {
            type: 'droptime',
        },
        exampleValue: '09:00',
    },
    {
        name: '上传控件',
        nameEn: 'Upload',
        code: 'upload',
        des: '支持 4 种控件样式切换',
        valueType: 'Object[]',
        exampleProps: {
            type: 'upload',
            listType: 'picture-card',
            autoUpload: false,
            limit: 1,
            showTips: false,
        },
        exampleValue: [],
    },
    {
        name: '开关',
        nameEn: 'Switch',
        code: 'switch',
        des: '',
        valueType: 'String | Number | Boolean',
        exampleProps: {
            type: 'switch',
            activeText: '不摸',
            inactiveText: '摸鱼',
        },
        exampleValue: false,
    },
    {
        name: '列表选择框',
        nameEn: 'TablePicker',
        path: '/table-picker',
        code: 'table',
        des: '支持配置接口自动发起请求，支持前台模糊查询/后台接口查询、换页可记录已选数据...',
        valueType: 'String[] | Number[] | Object[]',
        exampleProps: {
            type: 'table',
            searchConfig: {
                fields: [{ label: '姓名', code: 'name', type: 'text' }],
            },
            tableColumn: [
                { label: '姓名', code: 'name' },
                { label: '人员编码', code: 'code' },
            ],
            tableData: [
                { name: '张三', code: '001', id: '1' },
                { name: '李四', code: '002', id: '2' },
                { name: '王五', code: '003', id: '3' },
                { name: '奔跑的提款机', code: '666', id: '4' },
                { name: '二蛋快跑别管我', code: '004', id: '5' },
                { name: '望哥', code: '005', id: '6' },
                { name: '旗鼓相当的对手', code: '006', id: '7' },
            ],
        },
        exampleValue: ['4'],
    },
    {
        name: '树选择器框',
        nameEn: 'TreePicker',
        path: '/tree-picker',
        code: 'tree',
        des: '支持配置接口自动发起请求，支持多选...',
        valueType: 'String[] | Number[] | Object[]',
        exampleProps: {
            type: 'tree',
            filterable: true,
            requestConfig: {
                url: '/api/tree-data.json',
                method: 'get',
                params: {},
            },
        },
        exampleValue: null,
    },
    {
        name: '颜色选择器',
        nameEn: 'Color',
        code: 'color',
        des: '',
        valueType: 'String',
        exampleProps: {
            type: 'color',
        },
        exampleValue: window.localStorage.getItem('current_theme_color') || '',
    },
    {
        name: '滑块',
        nameEn: 'Slider',
        code: 'slider',
        des: '',
        valueType: 'Number',
        exampleProps: {
            type: 'slider',
            step: 10,
            showStops: true,
        },
        exampleValue: 20,
    },
];
